<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: seo_url_cronjob.php 509 2014-02-05 17:51:37Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 509 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2014-02-05 17:51:37 +0000 (Wed, 05 Feb 2014) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* -----------------------------------------------------------------------------------

Parameter:

Aktivieren:		Ja => activate=True
				Nein => activate=False

Sprachabhängig:	Ja => lang=True
				Nein => lang=False

kurz URL's		Ja => short=True
				Nein => short=False
				
Doppel-Content	Ja => avoid_content=True
vermeiden: 		Nein => avoid_content=False

Trennzeichen	- => spacer=-
Kategorien 		/ => spacer=/

Indizieren:		Ja => start=true
				Nein => start=false

Beispiel URL:

http://www.domain.de/seo_url_cronjob.php?activate=True&lang=False&avoid_content=True&spacer=-&start=true

*/

define('PASSWORD', 'secret');

if($_GET['password'] == PASSWORD) {
	include('includes/application_top.php');

// TODO: POST support with refresh products url
	$_POST['configuration']['MODULE_SEO_URL_INDEX_STATUS'] = (($_GET['activate']!='') ? $_GET['activate']:MODULE_SEO_URL_INDEX_STATUS);
	$_POST['configuration']['MODULE_SEO_URL_URL_LENGHT'] = (($_GET['short']!='') ? $_GET['short']:MODULE_SEO_URL_URL_LENGHT);
	$_POST['configuration']['MODULE_SEO_URL_INDEX_LANGUAGEURL'] = (($_GET['lang']!='') ? $_GET['lang']:MODULE_SEO_URL_INDEX_LANGUAGEURL);
  $_POST['configuration']['MODULE_SEO_URL_INDEX_AVOIDDUPLICATECONTENT'] = (($_GET['avoid_content']!='') ? $_GET['avoid_content']:MODULE_SEO_URL_INDEX_AVOIDDUPLICATECONTENT);
	$_POST['configuration']['MODULE_CATEGORY_SPACER'] = (($_GET['spacer']!='') ? $_GET['spacer']:MODULE_CATEGORY_SPACER);
	$_POST['startindex'] = (($_GET['start']!='') ? $_GET['start']:'false');
	
	require_once('inc/inc.seo_url.php');
	!$seo_url ? $seo_url = new SeoUrl() : false;
	$seo_url->createSeoDBTable();
	
} else
	die();